<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div>哈哈哈哈哈</div>
  <script>
    // 获取元素
    const box = document.querySelector('div');
    console.log(box);
    // 打印元素的属性
    console.dir(box);
  </script>
</body>
</html>